<?php if(isset($_GET['page'])){$s = htmlspecialchars($_GET['page']);}else{$s=1;}?>
<style>.panel-body,.panel-footer{background-color: #fff;box-shadow: 4px 4px 15px #eee;}.lli {font-family: 'Microsoft YaHei',微软雅黑,'MicrosoftJhengHei',华文细黑,STHeiti,MingLiu;font-size: 20px;color: #f00;border-bottom: 2px #f00 dashed;width: 165px; }</style>

<div class="layui-container">

<blockquote class="layui-elem-quote" style="border-left-color: #f00;background-color: #fff;">
	<?php echo htmlspecialchars($data['title']);?>
	<a href="?s=add" class="btn" style="float: right;color:#888;background-color: #dd514c;color: #fff">表白</a>
</blockquote>
<div class="row">
  	<div class="col-lg-12">
    	<div class="input-group">
      		<span class="input-group-btn">
        		<button class="btn btn-default" type="button" id="s">搜索</button>
      		</span>
      			<input type="text" class="form-control" id="name">
    		</div><!-- /input-group -->
  		</div><!-- /.col-lg-6 -->
	</div>
	<a href="?page=<?=$s-1?>" class="btn">上一页</a>
	第<span id="test"><?=$s?></span>页
	<a href="?page=<?=$s+1?>" class="btn" style="float: right;">下一页</a>
<div class="row" ng-app="myApp" ng-controller="siteCtrl">

<div ng-repeat="x in names" class="col-xs-12 col-sm-6">
	<div class="panel-body">
		<li class="lli">{{x.name1}} <img src="assets/img/love.png" width="30px"> {{x.name2}}</li><br>
		<h4>{{x.info}}</h4>
		<span style="float: right;color:#888">{{x.time}}</span>
	</div>
	 <div class="panel-footer" style="background-color: #fff;">
	 	<a class="btn" href="api.php?s=like&id={{x.Id}}">
	 		<i class="layui-icon" style="color: #f00" id="p"> &#xe6c6; {{x.s}}</i>  
		</a>
		<a href="s.php" class="btn" style="float: right;color:#888">
	 		<i class="layui-icon" style="color: #f00">&#xe641;</i>  
		</a>
	 </div><br>
</div> <!-- END -->

</div>
</div>
<script>
$("#s").click(function(){
  location.href='?s=search&name='+$('#name').val();
}); 

var app = angular.module('myApp', []);

app.controller('siteCtrl', function($scope, $http) {
  $http({
    method: 'GET',
    url: 'api.php?s=see&page='+$("#test").text()
  }).then(function successCallback(response) {
      $scope.names = response.data.data;
    }, function errorCallback(response) {
      alert("此条链接可能已到期！");
  });
});
</script>
<div style="padding-top: 10px;">
	<center>版权归属：<?=$data['title']?></center>
</div>
</body>
</html>
</body>
</html>